package com.cimpm.project.controller;

import com.cimpm.project.entity.Department;
import com.cimpm.project.service.impl.DepartmentServiceImpl;
import com.hby.common.annotation.aspect.AutoEntityProcess;
import com.hby.common.annotation.aspect.NoEntityAutoSingleProcess;
import com.hby.common.annotation.handler.AutoRequestBody;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
@RequestMapping("project")
@CrossOrigin
public class DepartmentController {

    @RequestMapping("/department")
    @AutoEntityProcess(BUSINESS_CLASS = Department.class, LOG_MSG = "department", PERMISSION_TYPE = "234")
    public Object departmentAuto(@AutoRequestBody Map<String, Object> param) {
        return null;
    }

    @RequestMapping("/departmentTree")
    @NoEntityAutoSingleProcess(SERVICE_CLASS = DepartmentServiceImpl.class, PARAM_FIELD = "projectId", LOG_MSG = "部门树", PERMISSION_TYPE = "5")
    public Object departmentTree(@AutoRequestBody Map<String, Object> param) {
        return null;
    }

}
